server: server_main.o
	g++ -o server server_main.o -lpthread -lpcap

client: client_main.o sniff_client_rdwr.o sniff_client.o
	g++ -o client client_main.o sniff_client_rdwr.o sniff_client.o -lpthread -lpcap

server_main.o: server_main.cpp definitions.hpp
	g++ -g -c -Wall server_main.cpp

client_main.o: client_main.cpp definitions.hpp
	g++ -g -c -Wall client_main.cpp

sniff_client_rdwr.o: sniff_client_rdwr.cpp definitions.hpp
	g++ -g -c -Wall sniff_client_rdwr.cpp

sniff_client.o: sniff_client.cpp definitions.hpp
	g++ -g -c -Wall sniff_client.cpp

clean:
	rm -f *.o *.bak client server Output


